package com.ews.onlineexchange.service;

import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.inject.Named;

import com.ews.onlineexchange.model.approved.ApprovedMemo;
import com.ews.onlineexchange.model.approved.ViolationRecord;

@Named
@ConversationScoped
public class ViolationRecordHome extends EntityHome<ViolationRecord, String> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Inject
	ApprovedClassHome approvedClassHome;
	
	@Override
	public ViolationRecord loadInstance() {
		ViolationRecord instance = super.loadInstance();
		approvedClassHome.setInstance(instance.getApprovedMatter().getApprovedClass());
		return instance;
	}
	
	

}
